<HTML>
<HEAD><TITLE>stateTransitions</TITLE></HEAD>
<BODY><H1>stateTransitions</H1>
Describes of how to transition from state to state. The current state corresponds to the image that will be shown (i.e. row from stimuli)<BR><BR>
<TABLE border="1">
<TR><TD>Name</TD><TD>Required</TD><TD>Type</TD><TD>Default value</TD><TD>Description</TD>
<TR><TD>currentState</TD><TD>Yes</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>1</TD><TD>The state the program is currently in</TD></TR>
<TR><TD>position</TD><TD>Yes</TD><TD><A title="A matrix (see description for how to fill it)">matrix</A></TD><TD>1</TD><TD>Either the position needed to trigger the change (index of the positions in targetPosition) if positionType=0, otherwise the color (1x3 matrix) from the image specified in positionType</TD></TR>
<TR><TD>distanceAllowed</TD><TD>Yes</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>1</TD><TD>the maximum distance from the position that will trigger the change (i.e. distance must be less than this), ignored if positionType>0</TD></TR>
<TR><TD>minimumDistance</TD><TD>No</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>0</TD><TD>the minimum distance from the position that will trigger the change (i.e. distance must be greater than this), ignored if positionType>0</TD></TR>
<TR><TD>penTouching</TD><TD>No</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>0</TD><TD>whether the pen must be touching (If not using a tablet set to 0, for a tablet 0 = doesn't matter, 1 = must touch, 2 = must not touch)</TD></TR>
<TR><TD>timeElapsed</TD><TD>No</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>0</TD><TD>the minimum amount of time that has elasped since arriving in this state (in seconds)</TD></TR>
<TR><TD>newState</TD><TD>Yes</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>1</TD><TD>the state to move to if all the conditions are satisfied</TD></TR>
<TR><TD>positionType</TD><TD>No</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>0</TD><TD>positionType = 0 means to use positions from targetPosition, positionType>1 means to use a color from image number position (e.g. position=2 means use image 2). In this case specify the color in position</TD></TR>
<TR><TD>colorDistance</TD><TD>No</TD><TD><A title="A single number (i.e. not a matrix)">number</A></TD><TD>0</TD><TD>allowable cityblock distance from the color (only used if positionType>0)</TD></TR>
</TABLE></BODY></HTML>